package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:23:59 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductGlossaryChangLogBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductGlossaryChangLog productGlossaryChangLog;

  protected BeanMap getBeanMap() {

    return new BeanMap(productGlossaryChangLog);
  }

  static {
    mappedDaoFields.put(
        "afterChangeContent",
        com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.AfterChangeContent);

    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.Id);

    mappedDaoFields.put(
        "approverId", com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.ApproverId);

    mappedDaoFields.put(
        "beforChangeContent",
        com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.BeforChangeContent);

    mappedDaoFields.put(
        "changeReason",
        com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.ChangeReason);

    mappedDaoFields.put(
        "editDate", com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.EditDate);

    mappedDaoFields.put(
        "editorId", com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.EditorId);

    mappedDaoFields.put(
        "productGlossaryId",
        com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.ProductGlossaryId);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.Remarks);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductGlossaryChangLogDAO.Status);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductGlossaryChangLogBean() {
    super();

    this.productGlossaryChangLog =
        new com.ourteam.product.requirement.dao.ProductGlossaryChangLog();
  }

  public ProductGlossaryChangLogBean(
      com.ourteam.product.requirement.dao.ProductGlossaryChangLog productGlossaryChangLog) {
    super();

    this.productGlossaryChangLog = productGlossaryChangLog;
  }

  public com.ourteam.product.requirement.dao.ProductGlossaryChangLog
      convertToProductGlossaryChangLog() {
    return this.productGlossaryChangLog;
  }

  public com.ourteam.product.requirement.dao.ProductGlossaryChangLog convertTo() {
    return this.productGlossaryChangLog;
  }

  /**
   * Get afterChangeContent
   *
   * @return String
   */
  public String getAfterChangeContent() {
    return (String) this.productGlossaryChangLog.getAfterChangeContent();
  }

  /**
   * Set afterChangeContent
   *
   * @parameter String
   */
  public void setAfterChangeContent(String afterChangeContent) {

    this.productGlossaryChangLog.setAfterChangeContent(afterChangeContent);
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productGlossaryChangLog.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productGlossaryChangLog.setId(id);
  }

  /**
   * Get approverId
   *
   * @return long
   */
  public long getApproverId() {
    return (long) this.productGlossaryChangLog.getApproverId();
  }

  /**
   * Set approverId
   *
   * @parameter long
   */
  public void setApproverId(long approverId) {

    this.productGlossaryChangLog.setApproverId(approverId);
  }

  /**
   * Get beforChangeContent
   *
   * @return String
   */
  public String getBeforChangeContent() {
    return (String) this.productGlossaryChangLog.getBeforChangeContent();
  }

  /**
   * Set beforChangeContent
   *
   * @parameter String
   */
  public void setBeforChangeContent(String beforChangeContent) {

    this.productGlossaryChangLog.setBeforChangeContent(beforChangeContent);
  }

  /**
   * Get changeReason
   *
   * @return String
   */
  public String getChangeReason() {
    return (String) this.productGlossaryChangLog.getChangeReason();
  }

  /**
   * Set changeReason
   *
   * @parameter String
   */
  public void setChangeReason(String changeReason) {

    this.productGlossaryChangLog.setChangeReason(changeReason);
  }

  /**
   * Get editDate
   *
   * @return java.util.Date
   */
  public java.util.Date getEditDate() {
    return (java.util.Date) this.productGlossaryChangLog.getEditDate();
  }

  /**
   * Set editDate
   *
   * @parameter java.util.Date
   */
  public void setEditDate(java.util.Date editDate) {

    this.productGlossaryChangLog.setEditDate(editDate);
  }

  /**
   * Get editorId
   *
   * @return long
   */
  public long getEditorId() {
    return (long) this.productGlossaryChangLog.getEditorId();
  }

  /**
   * Set editorId
   *
   * @parameter long
   */
  public void setEditorId(long editorId) {

    this.productGlossaryChangLog.setEditorId(editorId);
  }

  /**
   * Get productGlossaryId
   *
   * @return long
   */
  public long getProductGlossaryId() {
    return (long) this.productGlossaryChangLog.getProductGlossaryId();
  }

  /**
   * Set productGlossaryId
   *
   * @parameter long
   */
  public void setProductGlossaryId(long productGlossaryId) {

    this.productGlossaryChangLog.setProductGlossaryId(productGlossaryId);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productGlossaryChangLog.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productGlossaryChangLog.setRemarks(remarks);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productGlossaryChangLog.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productGlossaryChangLog.setStatus(status);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductGlossaryChangLogBean) == false) {
      return false;
    } // end if

    ProductGlossaryChangLogBean other = (ProductGlossaryChangLogBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductGlossaryChangLog tempProductGlossaryChangLog =
        other.convertToProductGlossaryChangLog();

    if (tempProductGlossaryChangLog == null || this.productGlossaryChangLog == null) {
      isEqual = false;
    } else if (tempProductGlossaryChangLog == this.productGlossaryChangLog
        || tempProductGlossaryChangLog.equals(this.productGlossaryChangLog)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductGlossaryChangLogBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossaryChangLog[] aProductGlossaryChangLogs) {

    return toArray(aProductGlossaryChangLogs, null);
  }

  public static ProductGlossaryChangLogBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossaryChangLog[] aProductGlossaryChangLogs,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductGlossaryChangLogs)) {
      return new ProductGlossaryChangLogBean[0];
    }

    int length = aProductGlossaryChangLogs.length;

    ProductGlossaryChangLogBean[] beans = new ProductGlossaryChangLogBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductGlossaryChangLogBean(aProductGlossaryChangLogs[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductGlossaryChangLogs[i]});
      }
    }

    return beans;
  }
}
